package com.zjitc.service.imp;

import com.zjitc.dao.CategoryDao;
import com.zjitc.model.Category;
import com.zjitc.service.CategoryService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/19 14:57
 * @description:
 */
@Service
public class CategoryServiceImp implements CategoryService {
  @Autowired
  private CategoryDao categoryDao;

  @Override
  public List<Category> findAllCategory() {
    return categoryDao.findAllCategory();
  }

  @Override
  public Category findByCid(String cid) {
    return categoryDao.findByCid(cid);
  }

  @Override
  public void editCategory(Category category) {
    categoryDao.editCategory(category);
  }

  @Override
  public void deleteCategory(String cid) {
    categoryDao.deleteCategory(cid);
  }

  @Override
  public void addCategory(Category category) {
    categoryDao.addCategory(category);
  }
}
